package HuaWei;

/**
 * @author xianyu
 * @version 1.0
 * @date 2020/5/23 17:27
 */
public class Main2 {
    public static void main(String[] args) {

    }

    public static int JumpFloor(int target){
        if(target <= 0) return 0;
        if(target == 1) return 1;
        if(target == 2) return 2;

        int pre1 = 1;
        int pre2 = 2;
        for (int i = 3; i <= target ; i++) {
            int cur = pre1 + pre2;
            pre1 = pre2;
            pre2 = cur;
        }
        return pre2;
    }

}
